{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Loading data into memory"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "Loading API is central to a lot of nilmtk operations and provides a great deal of flexibility. Let's look at ways in which we can load data from a NILMTK DataStore into memory. To see the full range of possible queries, we'll use the [iAWE data set](http://iawe.github.io) (whose HDF5 file can be downloaded [here](https://copy.com/C2sIt1UfDx1mfPlC)).\n",
    "\n",
    "The `load` function returns a *generator* of DataFrames loaded from the DataStore based on the conditions specified. If no conditions are specified, then all data from all the columns is loaded.  (If you have not come across Python generators, it might be worth reading [this quick guide to Python generators](http://stackoverflow.com/a/1756156/732596).)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**NOTE**: If you are on Windows, remember to escape the back-slashes, use forward-slashs, or use raw-strings when passing paths in Python, e.g. one of the following would work:\n",
    "\n",
    "```python\n",
    "iawe = DataSet('c:\\\\data\\\\iawe\\\\iawe.h5')\n",
    "iawe = DataSet('c:/data/iawe/iawe.h5')\n",
    "iawe = DataSet(r'c:\\data\\iawe\\iawe.h5')\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "MeterGroup(meters=\n",
       "  ElecMeter(instance=1, building=1, dataset='iAWE', site_meter, appliances=[])\n",
       "  ElecMeter(instance=2, building=1, dataset='iAWE', site_meter, appliances=[])\n",
       "  ElecMeter(instance=3, building=1, dataset='iAWE', appliances=[Appliance(type='fridge', instance=1)])\n",
       "  ElecMeter(instance=4, building=1, dataset='iAWE', appliances=[Appliance(type='air conditioner', instance=1)])\n",
       "  ElecMeter(instance=5, building=1, dataset='iAWE', appliances=[Appliance(type='air conditioner', instance=2)])\n",
       "  ElecMeter(instance=6, building=1, dataset='iAWE', appliances=[Appliance(type='washing machine', instance=1)])\n",
       "  ElecMeter(instance=7, building=1, dataset='iAWE', appliances=[Appliance(type='computer', instance=1)])\n",
       "  ElecMeter(instance=8, building=1, dataset='iAWE', appliances=[Appliance(type='clothes iron', instance=1)])\n",
       "  ElecMeter(instance=9, building=1, dataset='iAWE', appliances=[Appliance(type='unknown', instance=1)])\n",
       "  ElecMeter(instance=10, building=1, dataset='iAWE', appliances=[Appliance(type='television', instance=1)])\n",
       "  ElecMeter(instance=11, building=1, dataset='iAWE', appliances=[Appliance(type='wet appliance', instance=1)])\n",
       "  ElecMeter(instance=12, building=1, dataset='iAWE', appliances=[Appliance(type='motor', instance=1)])\n",
       ")"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from nilmtk import DataSet\n",
    "\n",
    "iawe = DataSet('/data/iawe/iawe.h5')\n",
    "elec = iawe.buildings[1].elec\n",
    "elec"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let us see what measurements we have for the fridge:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[('power factor', None),\n",
       " ('frequency', None),\n",
       " ('power', 'active'),\n",
       " ('power', 'reactive'),\n",
       " ('voltage', None),\n",
       " ('power', 'apparent'),\n",
       " ('current', None)]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "fridge = elec['fridge']\n",
    "fridge.available_columns()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Loading data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Load all columns (default)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th>physical_quantity</th>\n",
       "      <th>frequency</th>\n",
       "      <th colspan=\"2\" halign=\"left\">power</th>\n",
       "      <th>voltage</th>\n",
       "      <th>power</th>\n",
       "      <th>current</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>type</th>\n",
       "      <th></th>\n",
       "      <th>active</th>\n",
       "      <th>reactive</th>\n",
       "      <th></th>\n",
       "      <th>apparent</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:00+05:30</th>\n",
       "      <td>50.070000</td>\n",
       "      <td>0.111</td>\n",
       "      <td>2.483</td>\n",
       "      <td>235.070007</td>\n",
       "      <td>2.486</td>\n",
       "      <td>0.011</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:01+05:30</th>\n",
       "      <td>50.080002</td>\n",
       "      <td>0.200</td>\n",
       "      <td>2.547</td>\n",
       "      <td>235.020004</td>\n",
       "      <td>2.555</td>\n",
       "      <td>0.011</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:02+05:30</th>\n",
       "      <td>50.080002</td>\n",
       "      <td>0.152</td>\n",
       "      <td>2.480</td>\n",
       "      <td>234.979996</td>\n",
       "      <td>2.485</td>\n",
       "      <td>0.011</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:03+05:30</th>\n",
       "      <td>50.060001</td>\n",
       "      <td>0.159</td>\n",
       "      <td>2.444</td>\n",
       "      <td>235.000000</td>\n",
       "      <td>2.449</td>\n",
       "      <td>0.010</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:04+05:30</th>\n",
       "      <td>50.060001</td>\n",
       "      <td>0.215</td>\n",
       "      <td>2.510</td>\n",
       "      <td>234.949997</td>\n",
       "      <td>2.519</td>\n",
       "      <td>0.011</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "physical_quantity          frequency  power              voltage    power  \\\n",
       "type                                 active reactive             apparent   \n",
       "2013-06-07 05:30:00+05:30  50.070000  0.111    2.483  235.070007    2.486   \n",
       "2013-06-07 05:30:01+05:30  50.080002  0.200    2.547  235.020004    2.555   \n",
       "2013-06-07 05:30:02+05:30  50.080002  0.152    2.480  234.979996    2.485   \n",
       "2013-06-07 05:30:03+05:30  50.060001  0.159    2.444  235.000000    2.449   \n",
       "2013-06-07 05:30:04+05:30  50.060001  0.215    2.510  234.949997    2.519   \n",
       "\n",
       "physical_quantity         current  \n",
       "type                               \n",
       "2013-06-07 05:30:00+05:30   0.011  \n",
       "2013-06-07 05:30:01+05:30   0.011  \n",
       "2013-06-07 05:30:02+05:30   0.011  \n",
       "2013-06-07 05:30:03+05:30   0.010  \n",
       "2013-06-07 05:30:04+05:30   0.011  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = next(fridge.load())\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Load a single column of power data\n",
    "\n",
    "Use `fridge.power_series()` which returns a generator of 1-dimensional `pandas.Series` objects, each containing power data using the most 'sensible' AC type:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2013-06-07 05:30:00+05:30    0.111\n",
       "2013-06-07 05:30:01+05:30    0.200\n",
       "2013-06-07 05:30:02+05:30    0.152\n",
       "2013-06-07 05:30:03+05:30    0.159\n",
       "2013-06-07 05:30:04+05:30    0.215\n",
       "Name: (power, active), dtype: float32"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series = next(fridge.power_series())\n",
    "series.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "or, to get reactive power:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2013-06-07 05:30:00+05:30    2.483\n",
       "2013-06-07 05:30:01+05:30    2.547\n",
       "2013-06-07 05:30:02+05:30    2.480\n",
       "2013-06-07 05:30:03+05:30    2.444\n",
       "2013-06-07 05:30:04+05:30    2.510\n",
       "Name: (power, reactive), dtype: float32"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series = next(fridge.power_series(ac_type='reactive'))\n",
    "series.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Specify physical_quantity or AC type"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th>physical_quantity</th>\n",
       "      <th>power</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>type</th>\n",
       "      <th>reactive</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:00+05:30</th>\n",
       "      <td>2.483</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:01+05:30</th>\n",
       "      <td>2.547</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:02+05:30</th>\n",
       "      <td>2.480</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:03+05:30</th>\n",
       "      <td>2.444</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:04+05:30</th>\n",
       "      <td>2.510</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "physical_quantity            power\n",
       "type                      reactive\n",
       "2013-06-07 05:30:00+05:30    2.483\n",
       "2013-06-07 05:30:01+05:30    2.547\n",
       "2013-06-07 05:30:02+05:30    2.480\n",
       "2013-06-07 05:30:03+05:30    2.444\n",
       "2013-06-07 05:30:04+05:30    2.510"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = next(fridge.load(physical_quantity='power', ac_type='reactive'))\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "To load voltage data:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th>physical_quantity</th>\n",
       "      <th>voltage</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>type</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:00+05:30</th>\n",
       "      <td>235.070007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:01+05:30</th>\n",
       "      <td>235.020004</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:02+05:30</th>\n",
       "      <td>234.979996</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:03+05:30</th>\n",
       "      <td>235.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:04+05:30</th>\n",
       "      <td>234.949997</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "physical_quantity             voltage\n",
       "type                                 \n",
       "2013-06-07 05:30:00+05:30  235.070007\n",
       "2013-06-07 05:30:01+05:30  235.020004\n",
       "2013-06-07 05:30:02+05:30  234.979996\n",
       "2013-06-07 05:30:03+05:30  235.000000\n",
       "2013-06-07 05:30:04+05:30  234.949997"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = next(fridge.load(physical_quantity='voltage'))\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th>physical_quantity</th>\n",
       "      <th colspan=\"3\" halign=\"left\">power</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>type</th>\n",
       "      <th>active</th>\n",
       "      <th>reactive</th>\n",
       "      <th>apparent</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:00+05:30</th>\n",
       "      <td>0.111</td>\n",
       "      <td>2.483</td>\n",
       "      <td>2.486</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:01+05:30</th>\n",
       "      <td>0.200</td>\n",
       "      <td>2.547</td>\n",
       "      <td>2.555</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:02+05:30</th>\n",
       "      <td>0.152</td>\n",
       "      <td>2.480</td>\n",
       "      <td>2.485</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:03+05:30</th>\n",
       "      <td>0.159</td>\n",
       "      <td>2.444</td>\n",
       "      <td>2.449</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:04+05:30</th>\n",
       "      <td>0.215</td>\n",
       "      <td>2.510</td>\n",
       "      <td>2.519</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "physical_quantity          power                  \n",
       "type                      active reactive apparent\n",
       "2013-06-07 05:30:00+05:30  0.111    2.483    2.486\n",
       "2013-06-07 05:30:01+05:30  0.200    2.547    2.555\n",
       "2013-06-07 05:30:02+05:30  0.152    2.480    2.485\n",
       "2013-06-07 05:30:03+05:30  0.159    2.444    2.449\n",
       "2013-06-07 05:30:04+05:30  0.215    2.510    2.519"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = next(fridge.load(physical_quantity = 'power'))\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Loading by specifying AC type"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th>physical_quantity</th>\n",
       "      <th>power</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>type</th>\n",
       "      <th>active</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:00+05:30</th>\n",
       "      <td>0.111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:01+05:30</th>\n",
       "      <td>0.200</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:02+05:30</th>\n",
       "      <td>0.152</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:03+05:30</th>\n",
       "      <td>0.159</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:04+05:30</th>\n",
       "      <td>0.215</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "physical_quantity          power\n",
       "type                      active\n",
       "2013-06-07 05:30:00+05:30  0.111\n",
       "2013-06-07 05:30:01+05:30  0.200\n",
       "2013-06-07 05:30:02+05:30  0.152\n",
       "2013-06-07 05:30:03+05:30  0.159\n",
       "2013-06-07 05:30:04+05:30  0.215"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = next(fridge.load(ac_type='active'))\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Loading by resampling to a specified period"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th>physical_quantity</th>\n",
       "      <th>power</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>type</th>\n",
       "      <th>active</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:30:00+05:30</th>\n",
       "      <td>0.111000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:31:00+05:30</th>\n",
       "      <td>0.202000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:32:00+05:30</th>\n",
       "      <td>0.204000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:33:00+05:30</th>\n",
       "      <td>0.025000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-06-07 05:34:00+05:30</th>\n",
       "      <td>122.221001</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "physical_quantity               power\n",
       "type                           active\n",
       "2013-06-07 05:30:00+05:30    0.111000\n",
       "2013-06-07 05:31:00+05:30    0.202000\n",
       "2013-06-07 05:32:00+05:30    0.204000\n",
       "2013-06-07 05:33:00+05:30    0.025000\n",
       "2013-06-07 05:34:00+05:30  122.221001"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# resample to minutely (i.e. with a sample period of 60 secs)\n",
    "df = next(fridge.load(ac_type='active', sample_period=60))\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
